Skip to main content

Step 3 - Modification in existing Web Solution

Modify existing Web Solution to support API Endpoints

  • Add New class library project named DTO (.Net Std 2.0) project in Web Solution

  • Add all the custom and generic DTOs and SO from existing DTO project to newly created DTO manually.

  • Add all generated DTO and SO files.

  • Add all Generic View Models manually.

  • Add all required references.

  • Format all files.

  • Clean and Build the project.

  • Remove reference of existing DTO project from all projects which is using DTO (like PL, Common and WSL)

  • Add reference of new DTO in respective projects

  • Add Custom view model classes to newly added DTO project

  • Move CustomDDBinder class from Common project to IB Project

  • Remove reference of projects which contains business logic (like AB and IB)

  • Remove DAL-D and DAL-M reference from Web solution

  • Go to WSL project and delete all SVC files apart from Auth related files (most likely present under security folder)

  • Go to PL and remove all the service references apart from Auth

  • Create a new folder named ApiClient and paste all required API Client files

  • Add ApiClientBase class under ApiClient folder.

    • Add System.Text.Json NuGet package.
  • Format all files that are added.

  • Clean Build PL solution.

  • Do little code clean up delete RemoveRecord, RemoveRecords, SaveRecord, and SaveRecords from ApiClient files of all View.

  • Remove Struct access from GetRecord methods.

  • Some SaveRecords methods contains IsNewRecord so for those use DataVm view model instead of LstDataVm.

  • For some methods we need to correct return type in our PL files ( like use of .ToArray() and .ToList() ).

  • Modify CustomException class present under ErrorAPI